package com.base.mapper.voipmapper;

import com.base.po.voip.CompanyNews;
import com.base.po.voip.CompanyNewsExample;
import com.base.utils.Page;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CompanyNewsMapper {
    int countByExample(CompanyNewsExample example);

    int deleteByExample(CompanyNewsExample example);

    int deleteByPrimaryKey(String id);

    int insert(CompanyNews record);

    int insertSelective(CompanyNews record);

    List<CompanyNews> selectByExample(CompanyNewsExample example);
    
    List<CompanyNews> selectByAll(@Param("page") Page page, @Param("parentid") String parentid,
                                  @Param("receiveid") String receiveid, @Param("timeFrom") String timeFrom,
                                  @Param("timeTo") String timeTo, @Param("username") String username, @Param("title") String title);
    
    List<CompanyNews> selectByParentid(@Param("page") Page page, @Param("id") String id, @Param("parentid") String parentid,
                                       @Param("receiveid") String receiveid, @Param("timeFrom") String timeFrom,
                                       @Param("timeTo") String timeTo, @Param("username") String username, @Param("title") String title);
    
    List<CompanyNews> selectByShopidNotAll(@Param("page") Page page, @Param("id") String id, @Param("parentid") String parentid,
                                           @Param("receiveid") String receiveid, @Param("timeFrom") String timeFrom,
                                           @Param("timeTo") String timeTo, @Param("username") String username, @Param("title") String title);
    
    List<CompanyNews> selectByRoleTOne(@Param("adminid") String adminid, @Param("parentid") String parentid);
    
    List<CompanyNews> selectByRoleTwo(@Param("adminid") String adminid, @Param("parentid") String parentid
            , @Param("shopid") String shopid);

    CompanyNews selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") CompanyNews record, @Param("example") CompanyNewsExample example);

    int updateByExample(@Param("record") CompanyNews record, @Param("example") CompanyNewsExample example);

    int updateByPrimaryKeySelective(CompanyNews record);

    int updateByPrimaryKey(CompanyNews record);
    
    int countByAll(@Param("parentid") String parentid, @Param("receiveid") String receiveid,
                   @Param("timeFrom") String timeFrom, @Param("timeTo") String timeTo,
                   @Param("username") String username, @Param("title") String title);
    
    int countByParentid(@Param("id") String id, @Param("parentid") String parentid,
                        @Param("receiveid") String receiveid, @Param("timeFrom") String timeFrom,
                        @Param("timeTo") String timeTo, @Param("username") String username, @Param("title") String title);
    
    int countByShopidNotAll(@Param("id") String id, @Param("parentid") String parentid,
                            @Param("receiveid") String receiveid, @Param("timeFrom") String timeFrom,
                            @Param("timeTo") String timeTo, @Param("username") String username, @Param("title") String title);
}